<!DOCTYPE HTML>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
 <h4 class="sub-header">需求与开发搜索<h5>(若所查找无结果，则按照当前年份列表显示数据)</h5></h4>
 <form role="form" action="searchRequirementAndDevelopment" method="post">
	<div class="row">
		<div class="form-group col-xs-2">
			<label for="year">需求年份</label>
			<%--<input type="text" name="qwe" id="qwe" onclick="WdatePicker({dateFmt:'yyyy'})"/></br>--%>
			<s:textfield class="form-control" name="year" placeholder="yyyy" required="true"/>
			<span class="add-on"><i class="icon-calendar"></i></span>
			<script>
				$('#year').datetimepicker({
					format: 'yyyy',
					startDate: '2016',
					autoclose: 'true',
					todayHighlight: 'ture',
					startView: 4,
					minView: 4,
					language: 'zh-CN',
					clearBtn: 'true'
				});
			</script>
		</div>
		<div class="form-group col-xs-2">
		    <label for="requirementId">需求编号</label>
		    <s:textfield  class="form-control" name="requirementId" placeholder="xq-year-number"/>
		</div>
		<div class="form-group col-xs-2">
		    <label for="requirementName">需求名称</label>
		    <s:textfield  class="form-control" name="requirementName" placeholder="不支持模糊搜索"/>
		</div>
		<div class="form-group col-xs-2">
		    <label for="dealTeam">开发受理团队</label>
			<select id="dealTeam" name="dealTeam" class="form-control">
				<%--<option>-----请选择-----</option>--%>
			</select>
	 	</div>
	 	<div class="form-group col-xs-2">
		    <label for="projectStatus">项目状态</label>
		    <select name="projectStatus" class="form-control">
		    	<option>--请选择--</option>
	     		<option>等待排期</option>
	     		<option>开发</option>
	     		<option>测试</option>
	     		<option>待投产</option>
	     		<option>已投产</option>
	     		<option>撤销</option>
	     	</select>
		</div><br>&nbsp;&nbsp;&nbsp;
		<button type="submit" class="btn btn-primary" style="margin-top: 4px;">查找</button>
	</div>
</form>

<script>
	$(function () {
		getTeam();
		// 获取团队下拉列表
		function getTeam() {
			$.ajax({
				type: 'post',
				url: 'selectAcceptTeamAction.action',
				cache: 'false',
				dataType: 'json',
				success: function (msg) {
//                    var resp = eval("(" + msg.result+ ")");
					var resp = JSON.parse(msg.result);
					$("#dealTeam").empty();
					$.each(resp, function (i, item) {
//                            $("#dealTeam").append("<option value="+item.teamId+">"+item.teamName+"</option>");
						$("#dealTeam").append("<option >" + item.teamName + "</option>");
					});
//                    }
				},
				error: function () {
				}
			})
		}
	});
</script>


